import request from '../request'
import type { IResData } from '../types/requsetType'
import type { IUser, IUserInfo } from '../types/userType'
/**用户登录 */
export const loginAPI = (data: IUser) => {
  return request<IResData<IUserInfo>>({
    url: '/user/login',
    data,
    method: 'post',
  })
}
/**获取用户信息 */
export const getUserInfoAPI = () => {
  return request<IResData<IUserInfo>>({
    method: 'get',
    url: '/user/getUserInfo',
  })
}
